package com.lzw.breezeNovel.model.entity.pojo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.model.entity
 * @date 2025/2/27
 * @description 用户登入
 */
@Data
@SuppressWarnings("all")
public class LoginInfo {

    @Schema(description = "手机号码")
    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    @Schema(description = "密码")
    @NotNull(message = "密码不能为空")
    @Size(min = 6, max = 32, message = "密码长度在6到32位之间")
    private String password;

    @Schema(description = "验证码")
    @NotNull(message = "验证码不能为空")
    @Size(min = 4, max = 6, message = "验证码长度在4到6位之间")
    private String code;

    @Schema(description="验证码图片信息")
    private String image;

    @Schema(description="验证码key")
    private String key;

}
